{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "tags": [
     "remove-cell"
    ]
   },
   "outputs": [],
   "source": [
    "import sys\n",
    "import os\n",
    "if not any(path.endswith('textbook') for path in sys.path):\n",
    "    sys.path.append(os.path.abspath('../../..'))\n",
    "from textbook_utils import *"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "(sec:eda_guidelines)=\n",
    "# Guidelines for Exploration\n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "So far in this chapter, we have introduced the notion of feature types;\n",
    "seen how the feature type can help to figure out what plot to make; and\n",
    "described how to read distributions and relationships in a visualization.\n",
    "EDA relies on building these skills and flexibly developing your understanding of the data."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "You saw EDA in action in {numref}`Chapter %s <ch:wrangling>` when we developed checks for data quality and feature\n",
    "transformations to improve their usefulness in data analysis. Following are questions to guide you when making plots to explore the data:\n",
    "\n",
    "- How are the values of Feature X distributed?\n",
    "- How do Feature X and Feature Y relate to each other?\n",
    "- Is the distribution of Feature X the same across subgroups defined by Feature Z?\n",
    "- Are there any unusual observations in X? In the combination of (X,Y)? In X\n",
    "  for a subgroup of Z?\n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As you answer each of these questions, it is important to tie your answer\n",
    "back to the features measured and the context. It is also important to adopt an active,\n",
    "inquisitive approach to the investigation. To guide your\n",
    "explorations, ask yourself \"what next\" and \"so what\" questions, such as the\n",
    "following:\n",
    "\n",
    "- Do you have reason to expect that one group/observation might be different?\n",
    "- Why might your finding about shape matter?\n",
    "- What additional comparison might bring added value to the investigation?\n",
    "- Are there any potentially important features to create comparisons\n",
    "  with/against?\n",
    "\n",
    "In this process, it's important to step away from the computer at times to mull over your findings. You may want to read additional literature on the subject or go to an expert in the field to discuss your findings. For example, there could be good reasons for an unusual observation and someone in the field can help clear up and provide more background.\n",
    "\n",
    "We put these guidelines into practice with a concrete example of EDA next."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
